/*
 * @Description: 流程中心定义
 * @Author: seadon
 * @LastEditors: seadon
 * @Date: 2021-07-15 18:16:42
 * @LastEditTime: 2022-09-22 18:50:44
 */
import {
	ListTypeEnum,
	myApplyColumn,
	taskTypeEnum,
	doneTaskEnum,
} from '@/constant/enums/processCenter'
import { i18n } from '@/locales'
const { $t } = i18n

export const taskSelect: Partial<{
	[key in keyof typeof taskTypeEnum]: any[]
}> = {
	Apply: [
		{
			text: $t('pages.process.select.whole', '全部'),
			value: myApplyColumn.WHOLE,
		},
		{
			text: $t('pages.process.select.approval', '审批中'),
			value: myApplyColumn.APPROVE,
		},
		{
			text: $t('pages.process.select.finished', '已结束'),
			value: myApplyColumn.COMPLETE,
		},
		{
			text: $t('pages.process.column.terminatedStatus', '已终止'),
			value: myApplyColumn.TERMINATION,
		},
	],
	TaskNotice: [
		{
			text: $t('pages.process.select.todoNotice', '未读知会'),
			value: ListTypeEnum.TODO,
		},
		{
			text: $t('pages.process.select.readNotice', '已读知会'),
			value: ListTypeEnum.DONE,
		},
	],
	DoneTask: [
		{
			text: $t('pages.process.select.whole', '全部'),
			value: '',
		},
		{
			text: $t('pages.process.select.endOrSement', '加签'),
			value: doneTaskEnum.EndOrSement,
		},
		{
			text: $t('pages.process.select.approve', '同意'),
			value: doneTaskEnum.General,
		},
		{
			text: $t('pages.process.select.submit', '提交'),
			value: doneTaskEnum.Submit,
		},
		{
			text: $t('pages.process.select.withdrawn', '撤回'),
			value: doneTaskEnum.Revoke,
		},
		{
			text: $t('pages.process.select.opposition', '反对'),
			value: doneTaskEnum.VoteAgainst,
		},
		{
			text: $t('pages.process.select.reject', '拒绝'),
			value: doneTaskEnum.RollBackTaskByExpression,
		},
		{
			text: $t('pages.process.select.toVoid', '作废'),
			value: doneTaskEnum.TerminationProcess,
		},
		{
			text: $t('pages.process.select.terminated', '终止'),
			value: doneTaskEnum.RejectAndTerminate,
		},
		{
			text: $t('pages.process.select.transfer', '转办'),
			value: doneTaskEnum.Transfer,
		},
		{
			text: $t('pages.process.select.temporaryStorage', '暂存'),
			value: doneTaskEnum.TempSave,
		},
		{
			text: $t('pages.process.select.autoSkip', '自动跳过'),
			value: doneTaskEnum.SkipNode,
		},
	],
}

export const applyStatus = {
	TERMINATION: $t('pages.process.column.terminatedStatus', '已终止'),
	COMPLETE: $t('pages.process.column.endStatus', '已结束'),
	RUNNING: $t('pages.process.select.approval', '审批中'),
}
